package com.es.demo.dao;

import com.es.demo.model.Xdual;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface XdualDao {
    @Insert("insert into Xdual values(#{xdual.id},#{xdual.x})")
    int insert(@Param("xdual") Xdual xdual);

    @Select("select * from xdual")
    List<Xdual> select();
}
